package com.lancoo.ccas53.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lancoo.ccas53.entity.Room;
import com.lancoo.ccas53.entity.Type;
import com.lancoo.ccas53.pojo.common.PageInfo;
import com.lancoo.ccas53.pojo.vo.RoomCollegeTreeVo;
import com.lancoo.ccas53.pojo.vo.RoomTreeVo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * <p>
 * 教室 服务类
 * </p>
 *
 * @author quin.song
 * @since 2024-05-20
 */
public interface RoomService extends IService<Room> {

    /**
     * 同步教室
     *
     * @param taskId
     * @param schoolId
     */
    void syncRoom(Integer taskId, String schoolId);

    void syncRoomAdd(Integer taskId, String schoolId);

    /**
     * 获取教室列表
     *
     * @param page
     * @param taskId
     * @param campusId
     * @param roomType
     * @param isEnable
     * @return
     */
    PageInfo<Room> getRoomList(Page<Room> page, Integer taskId, Integer campusId, Integer roomType, Integer isEnable);

    PageInfo<Room> getRoomList1(Page<Room> page, Integer taskId, Integer campusId, Integer roomType, Integer isEnable, Integer ruleSet, String keyword, Integer buildingId);

    /**
     * 更新教室
     *
     * @param roomType
     * @param roomNum
     * @param isEnable
     * @param roomIds
     * @return
     */
    Boolean updateRoom(Integer roomType, String roomTypeName, Integer roomNum, Integer isEnable, Integer concurrentClass, String remark, List<Long> roomIds);


    /**
     * 清空教室设置
     *
     * @param taskId
     * @return
     */
    Boolean clearRoom(Integer taskId);

    /**
     * 获取教室树 根据楼宇分组
     *
     * @param taskId
     * @param keyword
     * @return
     */
    List<RoomTreeVo> getRoomTree(Integer taskId, String keyword);

    List<Room> getBuildingList(Integer taskId, Integer campusId);

    List<Integer> getBuildingFloor(Integer taskId, Integer campusId, Integer buildingId);

    List<Type> getRoomType(Integer taskId, Integer campusId, Integer buildingId, Integer floor);

    Boolean getRoomTypeById(Integer typeId);

    List<RoomCollegeTreeVo> getRoomCollegeTree(Integer taskId, String schoolId, String term, String baseCollegeId, Integer module, String keyword);

    List<Room> getRoomListByBuilding(Integer taskId, Integer campusId, Integer buildingId);

    void exportHolidaySchedule(HttpServletResponse response, Integer taskId, Integer campusId, Integer roomType, Integer isEnable, Integer currentPage, Integer pageSize);

    void importVenueInformationSettings(HttpServletResponse response, Integer taskId, Integer flag, MultipartFile file);

    void importSiteAllocation(HttpServletResponse response, Integer taskId, Integer flag, MultipartFile file);

    List<Long> getCurrentRoom(Integer taskId);

    List<Room> getBuildingListV2(Integer taskId);

    Boolean updateRoomPeriod(String baseSchemeId, String baseSchemeName, List<Room> roomIds, Integer taskId);
}
